package com.ht.module.bus.entity;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import javax.validation.constraints.NotEmpty;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


/**
 * <p>
 * 学校信息表
 * </p>
 *
 * @author hejialun
 * @since 2024-07-29
 */

@TableName("t_school")
@Data
@Accessors(chain = true)
public class TSchool{

	@ApiModelProperty("学校编码")
    @TableId
    private String schoolCode;

	@ApiModelProperty("学校名称")
    @NotEmpty
    private String schoolName;

	@ApiModelProperty("学校所在区划")
    @NotEmpty
    private String districtCode;

	@ApiModelProperty("地址")
    private String address;

	@ApiModelProperty("1住校，2走读 ： 关联字典：boarding_arrangement")
    private String schoolBoardingArrangement;

	@ApiModelProperty("教育阶段名称 关联字典：education_level")
    @NotEmpty
    private String educationStateName;

    @ApiModelProperty("关联站点")
    private String stationCode;

	@ApiModelProperty("部门id")
    private String deptId;

	@ApiModelProperty("创建人")
    private String createUser;

	@ApiModelProperty("创建时间")
    private LocalDateTime createDate;

	@ApiModelProperty("修改人")
    private String updateUser;

	@ApiModelProperty("修改时间")
    private LocalDateTime updateDate;

	@ApiModelProperty("01有效,02无效")
    private String state;


    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty("学校所在区划名称")
    @TableField(exist = false)
    private String districtName;


    @ApiModelProperty("是否生成站点,01：生成02：不生成")
    @TableField(exist = false)
    private String isCreateStation;


    @ApiModelProperty("关联站点名称")
    @TableField(exist = false)
    private String stationName;

    @ApiModelProperty("创建人姓名")
    @TableField(exist = false)
    private String createUserName;

    @TableField(exist = false)
    private String type;

    @TableField(exist = false)
    private String id;

    @TableField(exist = false)
    private String name;

    @ApiModelProperty("年级节点-用于构建学校班级树")
    @TableField(exist = false)
    private List<Tree<String>> children=new ArrayList<>();


}
